package SpringBoot.__template.full.config.startup;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

import com.titan.core.utils.io.ConsoleUtils;
import com.titan.core.utils.spring.SpringUtils;

@Component
public class ApplicationContextAwareStartup implements ApplicationContextAware {
//    private final static Logger log = LoggerFactory.getLogger(ApplicationContextAwareStartup.class);
    
    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        ConsoleUtils.method(ApplicationContextAwareStartup.class, "setApplicationContext");
        try {
//            SpringUtils.initApplicationContext(applicationContext);
//            JdbcUtils.setDataSource(SpringUtils.getBean(DataSource.class));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
